/*

 */
package com.gper.edu.flink

import org.apache.flink.streaming.api.scala._
import org.apache.flink.types._

object BatchWordCount {

  def main(args: Array[String]): Unit = {
    val env = StreamExecutionEnvironment.getExecutionEnvironment
    val dataStream = env.fromElements(("id", 10, "name", "gxc"), ("id", 20, "name", "echo"))
    val dataStream2 = env.fromElements((10, 10), (12, 23))
    dataStream2.map(value => {
      System.out.println(value.toString())
      value
    }).print()
    dataStream.map(value => {
      "{\"" + value._1 + "\":" + value._2 + ",\"" + value._3 + "\":\"" + value._4 + "\"}"
    }).setParallelism(1).print()
    env.execute()
    val arr = new Array[String](10);
  }
}
